<template>
	<view>
		<view class="form">
			<view class="">


				<view class="form-title xmt50">
					真实姓名
				</view>
				<view class="form-input xmt32 xflex-x-between">
					<view class="xflex-x-between form-ipt ">
						<input type="text" v-model="bank.realname" placeholder="请输入真实姓名" />

					</view>

				</view>

				<view class="form-title xmt50">
					身份证号码
				</view>
				<view class="form-input xmt32 xflex-x-between">
					<view class="xflex-x-between form-ipt ">
						<input type="text" v-model="bank.idcard" placeholder="请输入身份证号码" />

					</view>

				</view>

				<view class="form-title xmt50">
					银行卡号
				</view>
				<view class="form-input xmt32 xflex-x-between">
					<view class="xflex-x-between form-ipt ">
						<input type="text" v-model="bank.bankno" placeholder="请输入银行卡号" />

					</view>

				</view>
				<view class="form-title xmt50">
					银行卡号网点
				</view>
				<view class="form-input xmt32 xflex-x-between">
					<view class="xflex-x-between form-ipt ">
						<input type="text" v-model="bank.branch" placeholder="请输入银行卡号网点" />

					</view>

				</view>



				<view class="sub" @click="sub()">
					提交
				</view>
			</view>
		</view>

		<view class="tips">
			<view class="xflex-x">
				<image class="tips-icon" src="/pagesA/static/images/tishi.png" mode=""></image>
				<view class="tips-title">
					提现说明
				</view>
			</view>
			<u-parse :content="info.contenrt"></u-parse>
		</view>
	</view>
</template>

<script setup>
	import {
		reactive,
		ref,
	} from 'vue';
	import {
		partnerbank,
		partnerinfo,
		indexcontent
	} from '../../../network/home.js'

	const bank = reactive({
		realname: '',
		idcard: '',
		bankno: '',
		branch: ''
	})

	let info = reactive({

		contenrt: ''
	})

	const getpartner = () => {
		partnerinfo().then(res => {
			bank.realname = res.data.bank.realname
			bank.idcard = res.data.bank.idcard
			bank.bankno = res.data.bank.bankno
			bank.branch = res.data.bank.branch

		})
	}

	indexcontent({
		name: 'cash_intro'
	}).then(res => {
		info.contenrt = res.data
	})


	getpartner()

	const sub = () => {
		partnerbank(bank).then(res => {
			uni.showToast({
				icon: "none",
				title: '添加成功'
			})
		})
	}
</script>
<style>
	page {
		background-color: #f5f5f5;
	}
</style>

<style lang="scss" scoped>
	.form {
		width: 690rpx;
		// height: 678rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		margin: 22rpx auto;
		padding: 30rpx;
		box-sizing: border-box;

		&-title {
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #333333;
		}

		&-input {
			width: 630rpx;
			height: 100rpx;
			background: #F5F5F5;
			border-radius: 16rpx;

		}

		&-ipt {
			padding: 0 33rpx;
		}

		&-all {
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 30rpx;
			color: #999999;
			padding: 0 30rpx;
		}

		&-yuan {
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: #999999;

		}

		.boder {
			border-right: 1rpx solid #999999;
		}

		&-money {
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #999999;

			&>text {
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #333333;
			}
		}
	}

	.sub {
		width: 620rpx;
		height: 88rpx;
		background: linear-gradient(90deg, #0DBFFB, #198EFF);
		border-radius: 44rpx;

		font-family: PingFang SC;
		font-weight: 500;
		font-size: 36rpx;
		color: #FFFFFF;
		text-align: center;
		line-height: 88rpx;
		margin-top: 65rpx;
	}

	.tips {
		padding: 40rpx 55rpx;
		box-sizing: border-box;

		&-icon {
			width: 26rpx;
			height: 26rpx;
		}

		&-title {
			font-family: PingFang SC;
			font-weight: 400;
			font-size: 24rpx;
			color: #333333;
		}
	}
</style>